package com.spotbook.services;

import android.app.IntentService;
import android.content.ContentValues;
import android.content.Intent;

import com.spotbook.providers.Contract;

public class SpotService extends IntentService {

	public SpotService() {
		super(SpotService.class.getSimpleName());
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		String action = intent.getAction();
		if (Intent.ACTION_INSERT.equals(action)) {
			ContentValues values = intent
					.getParcelableExtra(Intent.EXTRA_SUBJECT);
			getContentResolver().insert(Contract.CONTENT_URI, values);
		}
	}
}
